home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_39934.txt < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.1 KB  |  42 lines

  1. -- card: 39934 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: FormatPhoneNum
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. 52
  11.  
  12. -- part contents for background part 5
  13. ----- text -----
  14. FormatPhoneNum
  15.  
  16. -- part contents for background part 6
  17. ----- text -----
  18. This is an XFCN that will take a string of 7 chars or 10 chars and format it into a phone number format e.g., (###)-###-### or ###-###.
  19.  
  20. This is free. All I ask is to be notified of any suggestions or bugs found, and a credit line if you use it in released stacks. C source available on request.
  21.  
  22. Copyright 1988. All rights reserved.
  23. Dwight Mayo
  24. GEnie, MacNet - DMAYO
  25. Compuserve - 76257,3303
  26.  
  27.  
  28.  
  29. -- part contents for background part 27
  30. ----- text -----
  31. XFCN
  32.  
  33. -- part contents for background part 7
  34. ----- text -----
  35. Syntax:
  36.  
  37.    formatPhoneNum(Value)
  38.  
  39. Value can be any string of 7 or 10 chars. formatPhoneNum will strip any char that is not between 0 and 9 and return a formatted number such as: (###)-###-### or ###-###.
  40.  
  41. NOTE: if the string is not 7 or 10 chars long then formatPhoneNum will just return the string. 
  42.